#include "head.h"

int main() {
    FILE *fp = NULL;
    char buff[1024] = {0};
    fp = popen("bash ./script/Memlog.sh", "r");
    if (fp == NULL) {
        perror("popen");
        exit(1);
    }
    size_t nread = fread(buff, 1, sizeof(buff), fp);
    if (nread < 0) {
        perror("fread");
        exit(1);
    }
    printf("%s\n", buff);

    return 0;
}